﻿using CleanArchitecture.Core.Configuration;
using CleanArchitecture.Core.SharedKernel;
using System;

namespace CleanArchitecture.Infrastructure.Entities.Business
{
    public class UploadUseCategory
    {
        public static string ClientSettingImage { get; } = "客户端设置图片";
        public static string FaceImage { get => "用户头像"; }
        public static string ColumnImage { get => "栏目相册"; }
        public static string NewsCarouselImage { get => "图片相册"; }
        public static string NewsCoverImage { get => "封面相册"; }
        public static string ArticleImage { get => "新闻文章内容相册"; }
        public static string AdvImage { get => "广告图"; }
        public static string NewsVideos { get => "文章视频文件"; }
        public static string NewsAudios { get => "文章音频文件"; }
        public static string NewsTextFiles { get => "文章文本文件"; }
        public static string NewsFiles { get => "文章附件"; }
        public static string BlogCoverImage { get => "博客封面相册"; }
        public static string BlogArticleImage { get => "博客文章内容相册"; }
        public static string BlogCarouselImage { get => "博客图片相册"; }
        public static string BlogVideos { get => "博客视频文件"; }
        public static string BlogAudios { get => "博客音频文件"; }
        public static string BlogTextFiles { get => "博客文本文件"; }
        public static string BlogFiles { get => "博客附件"; }

    }
    
    /// <summary>
    /// Represents a File with type like Picture,audio,txt,mp3,etc
    /// </summary>
    public partial class FileUpload : BaseEntity
    {
        /// <summary>
        /// Gets or sets the picture mime type
        /// </summary>
        public string MimeType { get; set; }

        public FileType FileType { get; set; }
        /// <summary>
        /// 设置上传文件的使用分类
        /// </summary>
        public string Category { get; set; }
        /// <summary>
        /// Gets or sets the SEO friendly filename of the picture
        /// </summary>
        public string SeoFilename { get; set; }

        /// <summary>
        /// Gets or sets the "alt" attribute for "img" HTML element. If empty, then a default rule will be used (e.g. product name)
        /// </summary>
        public string AltAttribute { get; set; }

        /// <summary>
        /// Gets or sets the "title" attribute for "img" HTML element. If empty, then a default rule will be used (e.g. product name)
        /// </summary>
        public string TitleAttribute { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the picture is new
        /// </summary>
        public EntityEnumConfig.YesorNo IsNew { get; set; }

        /// <summary>
        /// Gets or sets the picture binary
        /// </summary>
        public virtual FileBinary FileBinary { get; set; }

        /// <summary>
        /// Gets or sets the picture virtual path
        /// </summary>
        public string VirtualPath { get; set; }

        public EntityEnumConfig.FileStoreType StoreType { get; set; }

        public DateTime UpdatedOnTimeUtc { get; set; }

        public int DownloadCount { get; set; }

        public string LinkUrl { get; set; }
    }
}
